package com.example.auth.model.req;

import com.example.auth.annotation.PhoneNumber;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;

/**
 * @Description
 * @Author xijie.wang
 * @Date created on 2022/9/14
 */
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("用户注册信息")
public class RegisterReq {

	@NotBlank(message = "手机号不能为空")
	@PhoneNumber(message = "手机号码格式不正确")
	@ApiModelProperty(value = "手机号", dataType = "String", required = true)
	private String phone;

	@NotBlank(message = "密码不能为空")
	@ApiModelProperty(value = "密码", dataType = "String")
	private String password;

	@NotBlank(message = "确认密码不能为空")
	@ApiModelProperty(value = "确认密码", dataType = "String")
	private String confirmPwd;

	@NotBlank(message = "姓名不能为空")
	@ApiModelProperty(value = "姓名", dataType = "String")
	private String name;

}
